<?php
// No direct access to this file
defined('_JEXEC') or die('Restricted Access');
//var_dump($this);
$leftcol_width = $this->escape($this->params->get('leftcol_width'));
?>
<script type="text/javascript">
var submitted = false;

//Thanh Lam: ajax control 
window.addEvent('domready', function() {		
	toggleItems(<?php echo $this->max_number_items_perpage;?>);
	addKeywords(options);			
	$('perpage').addEvent( 'change', function(e){			
		addKeywords(options);							
		e.stop();
		ajaxsubmit();		
	} );
	$('sortBy').addEvent( 'change', function(e){			
		addKeywords(options);							
		e.stop();
		ajaxsubmit();	
	} );
});
</script>
	
<div class="head-sort">
	<label style="margin-right: 182px;width: <?php echo $leftcol_width;?>px;">Current search</label>
    <label >Results</label>
    <div class="sorting" style="float:right;">
    	<label style="margin-right:10px;padding-top: 4px;">Sort by</label>
    	<select name="filter_order" id="sortBy" style="width:100px;">
	    	<option selected="selected" value="" >Best Match</option>
	    	<option value="id">Id</option>
	    	<option value="year_of_publication">Date</option>
	    	<option value="title">Title</option>
    	</select>
    	<label style="margin:0px 10px;padding-top: 4px;">Per page</label>
    	<select name="limit" id="perpage">	    	
	    	<option selected="selected">5</option>
	    	<option>10</option>
	    	<option>15</option>
	    	<option>20</option>
    	</select>
    </div>
</div>
